﻿
Partial Class News
    Inherits System.Web.UI.Page
    Private mstrNewsItem As String = ""
    Private Const KEY_ITEM As String = "News"
    Private mcookie_language As HttpCookie

    Private Function ReadQueryString(ByRef pstrLanguage As String) As Boolean
        mstrNewsItem = ""
        mstrNewsItem = Request.QueryString(KEY_ITEM)
        ReadQueryString = True
    End Function

    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim mpLabel As Label
        mpLabel = CType(Master.FindControl("Lbl_Introduce"), Label)
        If Request.Cookies("cookie_language") Is Nothing Then
            mcookie_language = New HttpCookie("cookie_language", "E")
            mcookie_language.Expires = DateTime.Now.AddDays(30)
            Response.Cookies.Add(mcookie_language)
        End If
        '------------------------------------------
        Select Case Request.Cookies("cookie_language").Value
            Case "E"
                'Cont_News1.pstrHTMLpath = "Display_VN.htm"
                mpLabel.Text = "News"
            Case "V"
                'Cont_News1.pstrHTMLpath = "Display_EN.htm"
                mpLabel.Text = "Tin tức"
                'Case Else
                '    Cont_News1.pstrHTMLpath = "Display_EN.htm"
        End Select

        ReadQueryString(mstrNewsItem)
        Cont_News1.pstrHTMLpath = "Doc/" & mstrNewsItem & ".htm"

        
        
    End Sub
End Class
